package python_alog;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public interface Get_resume {
	default String algo_(String resume_file_name)
	{
		Process proc;
		String line = null;
        try {
            proc = Runtime.getRuntime().exec("python ..//resume_parser//uie.py --path "+
        resume_file_name);// 执行py文件
            //用输入输出流来截取结果  
            //python src//uie.py --path src//readfile.txt
            BufferedReader in = new BufferedReader(new InputStreamReader(proc.getInputStream(),"gbk"));
            
            while ((line = in.readLine()) != null); 
            in.close();
            proc.waitFor();
        } catch (IOException e) {
            e.printStackTrace();
        } catch (InterruptedException e) {
            e.printStackTrace();
        } 
		return line;
	}

}
